package com.yl.chainStore.mapper.warehouse;

import com.yl.chainStore.entity.warehouse.WarehouseDispatchOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.yl.chainStore.common.enums.Status
import com.yl.chainStore.entity.warehouse.WarehouseInOrder
import com.yl.chainStore.pojo.vo.warehouse.WarehouseDispatchOrderSelectVo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

/**
 * <p>
 * 仓库物品调动单 Mapper 接口
 * </p>
 *
 * @author cxw
 * @since 2021-06-10
 */
@Mapper
interface WarehouseDispatchOrderMapper : BaseMapper<WarehouseDispatchOrder> {


    fun getDispatchPage(
        @Param("page")page: Page<WarehouseDispatchOrder>,
        @Param("dispatchOrder")dispatchOrder: WarehouseDispatchOrderSelectVo
    ): Page<WarehouseDispatchOrder>

    /**
     * 获取某个用户某个状态的订单列表
     */
    fun getUserStagingDispatchOrder(@Param("userId")userId:Long,
                              @Param("warehouseId")warehouseId:Long,
                              @Param("status")status: Status
    ): List<WarehouseDispatchOrder>

}
